#!/bin/bash
# vim: set ft=sh

set -e -x

output_dir=$PWD/btrfs-tools

cd /tmp
curl https://www.kernel.org/pub/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v4.4.tar.gz | tar zxf -

cd btrfs-progs-v4.4

LDFLAGS=-static ./configure --disable-documentation

make

tar zcf $output_dir/btrfs-tools.tar.gz btrfs mkfs.btrfs
